<!-- Created by Harris Ward - www.hazamonzo.co.uk -->

<table align="center" style="border: 1px solid #000;width:900px; height:450px;">
	<tr>
		<td align="center"><div id="titleObject"></div></td>
	</tr>
	<tr>
			<td valign="top"><div id="selectStatusObject"></div></td>
	</tr>
  <tr height="100%">
		<td>
				<div id="ProductNamePrptObject" style="height:100%; width:100%;"></div>
		</td>
	</tr>
</table>

<script language="javascript" type="text/javascript">


var PROD_CODE = "S18_3136";

titleString = 
{
  name: "titleString",
  type: "text",
  title: "Order Status",
  listeners:["PROD_CODE"],
  htmlObject: "titleObject",
  executeAtStart: true,
  expression: function(){return this.title},
  preExecution:function(){
  	if( PROD_CODE != "null" ) {
		  this.title = "Selected Product (" + PROD_CODE + ")";
	  }
	  else  {
		  this.title = "Selected Product";
	  }
  },
  postExecution:function(){}
}


ProductSelector = 
{
  name: "ProductSelector",
  type: "select",
  parameter:"PROD_CODE",
  parameters: [],
  valuesArray: [["S18_3136", "S18_3136"],["S24_2011", "S24_2011"]],
  htmlObject: "selectStatusObject",
  executeAtStart: true,
  preExecution:function(){},
  postExecution:function(){Dashboards.processChange(this.name);}
}

ProductReport = 
{
  name: "orderStatus",
  type: "prpt",
  path: "/public/Steel Wheels/Widget Library/Report Snippets/Product Sales.prpt",
  listeners:["PROD_CODE"],
  parameters: [["PROD_CODE","PROD_CODE"]],
  htmlObject: "ProductNamePrptObject",
  executeAtStart: true,
  postExecution:function(){}
}

function load(){
  var components = [titleString, ProductSelector, ProductReport];
	Dashboards.init(components);
}

load();

</script>

